/* @(#)GSOrderDetailQueryForSW.java    
 *
 * Project: GS
 *
 * Modify Information:
 * =============================================================================
 *   Author       Date       Description
 *   ------------ ---------- ---------------------------------------------------
 *   Wangp     2008-1-29    新增
 *
 * Copyright Notice:
 * =============================================================================
 *    Copyright (c) 2001-2006 Beijing HiTRUST Technology Co., Ltd. 1808 Room, 
 *        Science & Technology Building, No. 9 South Street, Zhong Guan Cun, 
 *        Haidian District, Beijing ,100081, China All rights reserved.
 *
 *    This software is the confidential and proprietary information of
 *        Beijing HiTRUST Technology Co., Ltd. ("Confidential Information").
 *        You shall not disclose such Confidential Information and shall use it
 *        only in accordance with the terms of the license agreement you entered
 *        into with HiTRUST.
 *
 * Warning:
 * =============================================================================
 * 
 */
package com.hitrust.gs.vo;

import java.sql.ResultSet;
import java.sql.SQLException;

import com.hitrust.gs.service.GSBaseBean;

/**
 * 
 */
public class GSOrderDetailQueryForSWVO implements GSBaseBean {
    
    public String orderid;

    public String concentricityId;

    public String manufactureName;

    public String isTradeFlatManufacture;

    public String manufactureSpec;

    public String manufactureType;

    public String manufactureBrand;

    public String orderCount;

    public String providerName;

    public String wordcorpId;

    public String manufactureUnitPrice;

    public String deliverGoodsDate;

    public String deliverGoodsTime;
    
    public String providerId;
    
    public String orderDetailId;
    
    public String orderDetailStatus;
    
    public String orderCreateDate;
    
    public String quantUnit;
    
    public String isTradeFlatProvider;
    
    public String deliverGoodsAddr;
    
    public String deliverGoodsId;
    
    public String mode;
    /* (non-Javadoc)
     * @see com.hitrust.gs.service.GSBaseBean#process(java.sql.ResultSet)
     */
    public Object process(ResultSet aResultSet) throws SQLException {
        GSOrderDetailQueryForSWVO tGSOrderVO = new GSOrderDetailQueryForSWVO();
        tGSOrderVO.orderDetailId = aResultSet.getString("P1") == null ? "" : aResultSet.getString("P1").trim();
        tGSOrderVO.concentricityId = aResultSet.getString("P2") == null ? "" : aResultSet.getString("P2").trim();
        tGSOrderVO.manufactureName = aResultSet.getString("P3") == null ? "" : aResultSet.getString("P3").trim();
        tGSOrderVO.isTradeFlatManufacture = aResultSet.getString("P4") == null ? "" : aResultSet.getString("P4").trim();
        tGSOrderVO.manufactureSpec = aResultSet.getString("P5") == null ? "" : aResultSet.getString("P5").trim();
        tGSOrderVO.manufactureType = aResultSet.getString("P6") == null ? "" : aResultSet.getString("P6").trim();
        tGSOrderVO.manufactureBrand = aResultSet.getString("P7") == null ? "" : aResultSet.getString("P7").trim();
        tGSOrderVO.orderCount = aResultSet.getString("P8") == null ? "" : aResultSet.getString("P8").trim();
        tGSOrderVO.providerName = aResultSet.getString("P9") == null ? "" : aResultSet.getString("P9").trim();
        tGSOrderVO.wordcorpId = aResultSet.getString("P10") == null ? "" : aResultSet.getString("P10").trim();
        tGSOrderVO.manufactureUnitPrice = aResultSet.getString("P11") == null ? "" : aResultSet.getString("P11").trim();
        tGSOrderVO.deliverGoodsDate = aResultSet.getString("P12") == null ? "" : aResultSet.getString("P12").trim();
        tGSOrderVO.deliverGoodsTime = aResultSet.getString("P13") == null ? "" : aResultSet.getString("P13").trim();
        tGSOrderVO.providerId = aResultSet.getString("P14") == null ? "" : aResultSet.getString("P14").trim();
        tGSOrderVO.orderid = aResultSet.getString("P15") == null ? "" : aResultSet.getString("P15").trim();
        tGSOrderVO.orderDetailStatus = aResultSet.getString("P16") == null ? "" : aResultSet.getString("P16").trim();
        tGSOrderVO.orderCreateDate = aResultSet.getString("P17") == null ? "" : aResultSet.getString("P17").trim();
        tGSOrderVO.quantUnit = aResultSet.getString("P18") == null ? "" : aResultSet.getString("P18").trim();
        tGSOrderVO.isTradeFlatProvider = aResultSet.getString("P20");
        tGSOrderVO.deliverGoodsAddr = aResultSet.getString("P22");
        tGSOrderVO.deliverGoodsId = aResultSet.getString("P23");
        tGSOrderVO.mode = aResultSet.getString("P24");
        return tGSOrderVO;
    }
    
    public String getOrderDetailStatusInfo(String aOrderDetailStatus) {
        String tResult = "";
        if(aOrderDetailStatus != null && aOrderDetailStatus.trim().length() > 0) {
            aOrderDetailStatus = aOrderDetailStatus.trim();
            if(aOrderDetailStatus.equals("1")) tResult = "已申请";
            else if(aOrderDetailStatus.equals("2")) tResult = "初审通过";
            else if(aOrderDetailStatus.equals("3")) tResult = "复审通过";
            else if(aOrderDetailStatus.equals("4")) tResult = "初审未通过";
            else if(aOrderDetailStatus.equals("5")) tResult = "复审未通过";
            else if(aOrderDetailStatus.equals("6")) tResult = "已提交";
            else if(aOrderDetailStatus.equals("7")) tResult = "已核准";
            else if(aOrderDetailStatus.equals("8")) tResult = "未核准";
            else if(aOrderDetailStatus.equals("9")) tResult = "订货中";
            else if(aOrderDetailStatus.equals("10")) tResult = "发货确认";
            else if(aOrderDetailStatus.equals("11")) tResult = "送货拒绝";
            else if(aOrderDetailStatus.equals("12")) tResult = "交货确认";
            else if(aOrderDetailStatus.equals("13")) tResult = "收款确认";
            else if(aOrderDetailStatus.equals("14")) tResult = "已完成";
            else if(aOrderDetailStatus.equals("18")) tResult = "补单";
            else if(aOrderDetailStatus.equals("19")) tResult = "补单确认";
            else if(aOrderDetailStatus.equals("20")) tResult = "已退货";
            else if(aOrderDetailStatus.equals("21")) tResult = "已取消";
            else if(aOrderDetailStatus.equals("22")) tResult = "已作废";
        }
        return tResult;
    }
    
    public String getDeliverGoodsTimeInfo(String aDeliverGoodsTime) {
        String tResult = "";
        if(aDeliverGoodsTime != null && aDeliverGoodsTime.trim().length() > 0) {
            if(aDeliverGoodsTime.equals("1")) tResult = "8:00-12:00";
            else if(aDeliverGoodsTime.equals("2")) tResult = "13:00-18:00";
            else if(aDeliverGoodsTime.equals("3")) tResult = "全天";
        }
        return tResult;
    }
}
